<?php
/**
 * Created by PhpStorm.
 * User: fairy
 * Date: 14-3-6
 * Time: 上午11:00
 */

class ContentsAction extends BaseAction{
    public function index(){
        $this->display();
    }
    public function detail(){

        if(!empty($_GET["id"])) {
            $model = M('article');
            $map = array();
            $map['id'] = I("get.id");

            $vo = $model->where($map)->find();

            $this->assign('vo', $vo);
            $this->display('Contents:detail');
        }
        else $this->error("出错");

    }
} 